package leetcode_1801_1900;

import java.util.HashSet;
import java.util.Set;

public class LeeCode_1876 {
    public static void main(String[] args) {

    }
    private static int countGoodSubstrings(String s) {
        Set<Character> set = new HashSet<>();
        int l = 0, r = 2, ans = 0;
        while (r < s.length()){
            set.clear();
            for (int i = l; i <= r; i++) {
                set.add(s.charAt(i));
            }
            if (set.size() == 3)
                ans++;
            l++;
            r++;
        }
        return ans;
    }
}
